/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.comfacauca.xmlc2.entidades.glpi;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author eorozco
 */
@Entity
@Table(name = "glpi_tickets")
@NamedQueries({
    @NamedQuery(name = "GlpiTickets.findAll", query = "SELECT g FROM GlpiTickets g"),
    @NamedQuery(name = "GlpiTickets.findById", query = "SELECT g FROM GlpiTickets g WHERE g.id = :id"),
    @NamedQuery(name = "GlpiTickets.findByEntitiesId", query = "SELECT g FROM GlpiTickets g WHERE g.entitiesId = :entitiesId"),
    @NamedQuery(name = "GlpiTickets.findByName", query = "SELECT g FROM GlpiTickets g WHERE g.name = :name"),
    @NamedQuery(name = "GlpiTickets.findByDate", query = "SELECT g FROM GlpiTickets g WHERE g.date = :date"),
    @NamedQuery(name = "GlpiTickets.findByClosedate", query = "SELECT g FROM GlpiTickets g WHERE g.closedate = :closedate"),
    @NamedQuery(name = "GlpiTickets.findBySolvedate", query = "SELECT g FROM GlpiTickets g WHERE g.solvedate = :solvedate"),
    @NamedQuery(name = "GlpiTickets.findByDateMod", query = "SELECT g FROM GlpiTickets g WHERE g.dateMod = :dateMod"),
    @NamedQuery(name = "GlpiTickets.findByUsersIdLastupdater", query = "SELECT g FROM GlpiTickets g WHERE g.usersIdLastupdater = :usersIdLastupdater"),
    @NamedQuery(name = "GlpiTickets.findByStatus", query = "SELECT g FROM GlpiTickets g WHERE g.status = :status"),
    @NamedQuery(name = "GlpiTickets.findByUsersIdRecipient", query = "SELECT g FROM GlpiTickets g WHERE g.usersIdRecipient = :usersIdRecipient"),
    @NamedQuery(name = "GlpiTickets.findByRequesttypesId", query = "SELECT g FROM GlpiTickets g WHERE g.requesttypesId = :requesttypesId"),
    @NamedQuery(name = "GlpiTickets.findBySuppliersIdAssign", query = "SELECT g FROM GlpiTickets g WHERE g.suppliersIdAssign = :suppliersIdAssign"),
    @NamedQuery(name = "GlpiTickets.findByItemtype", query = "SELECT g FROM GlpiTickets g WHERE g.itemtype = :itemtype"),
    @NamedQuery(name = "GlpiTickets.findByItemsId", query = "SELECT g FROM GlpiTickets g WHERE g.itemsId = :itemsId"),
    @NamedQuery(name = "GlpiTickets.findByUrgency", query = "SELECT g FROM GlpiTickets g WHERE g.urgency = :urgency"),
    @NamedQuery(name = "GlpiTickets.findByImpact", query = "SELECT g FROM GlpiTickets g WHERE g.impact = :impact"),
    @NamedQuery(name = "GlpiTickets.findByPriority", query = "SELECT g FROM GlpiTickets g WHERE g.priority = :priority"),
    @NamedQuery(name = "GlpiTickets.findByItilcategoriesId", query = "SELECT g FROM GlpiTickets g WHERE g.itilcategoriesId = :itilcategoriesId"),
    @NamedQuery(name = "GlpiTickets.findByType", query = "SELECT g FROM GlpiTickets g WHERE g.type = :type"),
    @NamedQuery(name = "GlpiTickets.findByCostTime", query = "SELECT g FROM GlpiTickets g WHERE g.costTime = :costTime"),
    @NamedQuery(name = "GlpiTickets.findByCostFixed", query = "SELECT g FROM GlpiTickets g WHERE g.costFixed = :costFixed"),
    @NamedQuery(name = "GlpiTickets.findByCostMaterial", query = "SELECT g FROM GlpiTickets g WHERE g.costMaterial = :costMaterial"),
    @NamedQuery(name = "GlpiTickets.findBySolutiontypesId", query = "SELECT g FROM GlpiTickets g WHERE g.solutiontypesId = :solutiontypesId"),
    @NamedQuery(name = "GlpiTickets.findByGlobalValidation", query = "SELECT g FROM GlpiTickets g WHERE g.globalValidation = :globalValidation"),
    @NamedQuery(name = "GlpiTickets.findBySlasId", query = "SELECT g FROM GlpiTickets g WHERE g.slasId = :slasId"),
    @NamedQuery(name = "GlpiTickets.findBySlalevelsId", query = "SELECT g FROM GlpiTickets g WHERE g.slalevelsId = :slalevelsId"),
    @NamedQuery(name = "GlpiTickets.findByDueDate", query = "SELECT g FROM GlpiTickets g WHERE g.dueDate = :dueDate"),
    @NamedQuery(name = "GlpiTickets.findByBeginWaitingDate", query = "SELECT g FROM GlpiTickets g WHERE g.beginWaitingDate = :beginWaitingDate"),
    @NamedQuery(name = "GlpiTickets.findBySlaWaitingDuration", query = "SELECT g FROM GlpiTickets g WHERE g.slaWaitingDuration = :slaWaitingDuration"),
    @NamedQuery(name = "GlpiTickets.findByWaitingDuration", query = "SELECT g FROM GlpiTickets g WHERE g.waitingDuration = :waitingDuration"),
    @NamedQuery(name = "GlpiTickets.findByCloseDelayStat", query = "SELECT g FROM GlpiTickets g WHERE g.closeDelayStat = :closeDelayStat"),
    @NamedQuery(name = "GlpiTickets.findBySolveDelayStat", query = "SELECT g FROM GlpiTickets g WHERE g.solveDelayStat = :solveDelayStat"),
    @NamedQuery(name = "GlpiTickets.findByTakeintoaccountDelayStat", query = "SELECT g FROM GlpiTickets g WHERE g.takeintoaccountDelayStat = :takeintoaccountDelayStat"),
    @NamedQuery(name = "GlpiTickets.findByActiontime", query = "SELECT g FROM GlpiTickets g WHERE g.actiontime = :actiontime"),
    @NamedQuery(name = "GlpiTickets.findByIsDeleted", query = "SELECT g FROM GlpiTickets g WHERE g.isDeleted = :isDeleted"),
    @NamedQuery(name = "GlpiTickets.findByLocationsId", query = "SELECT g FROM GlpiTickets g WHERE g.locationsId = :locationsId")})
public class GlpiTickets implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @NotNull
    @Column(name = "entities_id")
    private int entitiesId;
    @Size(max = 255)
    @Column(name = "name")
    private String name;
    @Column(name = "date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date date;
    @Column(name = "closedate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date closedate;
    @Column(name = "solvedate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date solvedate;
    @Column(name = "date_mod")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dateMod;
    @Basic(optional = false)
    @NotNull
    @Column(name = "users_id_lastupdater")
    private int usersIdLastupdater;
    @Size(max = 255)
    @Column(name = "status")
    private String status;
    @Basic(optional = false)
    @NotNull
    @Column(name = "users_id_recipient")
    private int usersIdRecipient;
    @Basic(optional = false)
    @NotNull
    @Column(name = "requesttypes_id")
    private int requesttypesId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "suppliers_id_assign")
    private int suppliersIdAssign;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 100)
    @Column(name = "itemtype")
    private String itemtype;
    @Basic(optional = false)
    @NotNull
    @Column(name = "items_id")
    private int itemsId;
    @Lob
    @Size(max = 2147483647)
    @Column(name = "content")
    private String content;
    @Basic(optional = false)
    @NotNull
    @Column(name = "urgency")
    private int urgency;
    @Basic(optional = false)
    @NotNull
    @Column(name = "impact")
    private int impact;
    @Basic(optional = false)
    @NotNull
    @Column(name = "priority")
    private int priority;
    @Basic(optional = false)
    @NotNull
    @Column(name = "itilcategories_id")
    private int itilcategoriesId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "type")
    private int type;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Basic(optional = false)
    @NotNull
    @Column(name = "cost_time")
    private BigDecimal costTime;
    @Basic(optional = false)
    @NotNull
    @Column(name = "cost_fixed")
    private BigDecimal costFixed;
    @Basic(optional = false)
    @NotNull
    @Column(name = "cost_material")
    private BigDecimal costMaterial;
    @Basic(optional = false)
    @NotNull
    @Column(name = "solutiontypes_id")
    private int solutiontypesId;
    @Lob
    @Size(max = 65535)
    @Column(name = "solution")
    private String solution;
    @Size(max = 255)
    @Column(name = "global_validation")
    private String globalValidation;
    @Basic(optional = false)
    @NotNull
    @Column(name = "slas_id")
    private int slasId;
    @Basic(optional = false)
    @NotNull
    @Column(name = "slalevels_id")
    private int slalevelsId;
    @Column(name = "due_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dueDate;
    @Column(name = "begin_waiting_date")
    @Temporal(TemporalType.TIMESTAMP)
    private Date beginWaitingDate;
    @Basic(optional = false)
    @NotNull
    @Column(name = "sla_waiting_duration")
    private int slaWaitingDuration;
    @Basic(optional = false)
    @NotNull
    @Column(name = "waiting_duration")
    private int waitingDuration;
    @Basic(optional = false)
    @NotNull
    @Column(name = "close_delay_stat")
    private int closeDelayStat;
    @Basic(optional = false)
    @NotNull
    @Column(name = "solve_delay_stat")
    private int solveDelayStat;
    @Basic(optional = false)
    @NotNull
    @Column(name = "takeintoaccount_delay_stat")
    private int takeintoaccountDelayStat;
    @Basic(optional = false)
    @NotNull
    @Column(name = "actiontime")
    private int actiontime;
    @Basic(optional = false)
    @NotNull
    @Column(name = "is_deleted")
    private boolean isDeleted;
    @Basic(optional = false)
    @NotNull
    @Column(name = "locations_id")
    private int locationsId;

    public GlpiTickets() {
    }

    public GlpiTickets(Integer id) {
        this.id = id;
    }

    public GlpiTickets(Integer id, int entitiesId, int usersIdLastupdater, int usersIdRecipient, int requesttypesId, int suppliersIdAssign, String itemtype, int itemsId, int urgency, int impact, int priority, int itilcategoriesId, int type, BigDecimal costTime, BigDecimal costFixed, BigDecimal costMaterial, int solutiontypesId, int slasId, int slalevelsId, int slaWaitingDuration, int waitingDuration, int closeDelayStat, int solveDelayStat, int takeintoaccountDelayStat, int actiontime, boolean isDeleted, int locationsId) {
        this.id = id;
        this.entitiesId = entitiesId;
        this.usersIdLastupdater = usersIdLastupdater;
        this.usersIdRecipient = usersIdRecipient;
        this.requesttypesId = requesttypesId;
        this.suppliersIdAssign = suppliersIdAssign;
        this.itemtype = itemtype;
        this.itemsId = itemsId;
        this.urgency = urgency;
        this.impact = impact;
        this.priority = priority;
        this.itilcategoriesId = itilcategoriesId;
        this.type = type;
        this.costTime = costTime;
        this.costFixed = costFixed;
        this.costMaterial = costMaterial;
        this.solutiontypesId = solutiontypesId;
        this.slasId = slasId;
        this.slalevelsId = slalevelsId;
        this.slaWaitingDuration = slaWaitingDuration;
        this.waitingDuration = waitingDuration;
        this.closeDelayStat = closeDelayStat;
        this.solveDelayStat = solveDelayStat;
        this.takeintoaccountDelayStat = takeintoaccountDelayStat;
        this.actiontime = actiontime;
        this.isDeleted = isDeleted;
        this.locationsId = locationsId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public int getEntitiesId() {
        return entitiesId;
    }

    public void setEntitiesId(int entitiesId) {
        this.entitiesId = entitiesId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Date getClosedate() {
        return closedate;
    }

    public void setClosedate(Date closedate) {
        this.closedate = closedate;
    }

    public Date getSolvedate() {
        return solvedate;
    }

    public void setSolvedate(Date solvedate) {
        this.solvedate = solvedate;
    }

    public Date getDateMod() {
        return dateMod;
    }

    public void setDateMod(Date dateMod) {
        this.dateMod = dateMod;
    }

    public int getUsersIdLastupdater() {
        return usersIdLastupdater;
    }

    public void setUsersIdLastupdater(int usersIdLastupdater) {
        this.usersIdLastupdater = usersIdLastupdater;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public int getUsersIdRecipient() {
        return usersIdRecipient;
    }

    public void setUsersIdRecipient(int usersIdRecipient) {
        this.usersIdRecipient = usersIdRecipient;
    }

    public int getRequesttypesId() {
        return requesttypesId;
    }

    public void setRequesttypesId(int requesttypesId) {
        this.requesttypesId = requesttypesId;
    }

    public int getSuppliersIdAssign() {
        return suppliersIdAssign;
    }

    public void setSuppliersIdAssign(int suppliersIdAssign) {
        this.suppliersIdAssign = suppliersIdAssign;
    }

    public String getItemtype() {
        return itemtype;
    }

    public void setItemtype(String itemtype) {
        this.itemtype = itemtype;
    }

    public int getItemsId() {
        return itemsId;
    }

    public void setItemsId(int itemsId) {
        this.itemsId = itemsId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getUrgency() {
        return urgency;
    }

    public void setUrgency(int urgency) {
        this.urgency = urgency;
    }

    public int getImpact() {
        return impact;
    }

    public void setImpact(int impact) {
        this.impact = impact;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    public int getItilcategoriesId() {
        return itilcategoriesId;
    }

    public void setItilcategoriesId(int itilcategoriesId) {
        this.itilcategoriesId = itilcategoriesId;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public BigDecimal getCostTime() {
        return costTime;
    }

    public void setCostTime(BigDecimal costTime) {
        this.costTime = costTime;
    }

    public BigDecimal getCostFixed() {
        return costFixed;
    }

    public void setCostFixed(BigDecimal costFixed) {
        this.costFixed = costFixed;
    }

    public BigDecimal getCostMaterial() {
        return costMaterial;
    }

    public void setCostMaterial(BigDecimal costMaterial) {
        this.costMaterial = costMaterial;
    }

    public int getSolutiontypesId() {
        return solutiontypesId;
    }

    public void setSolutiontypesId(int solutiontypesId) {
        this.solutiontypesId = solutiontypesId;
    }

    public String getSolution() {
        return solution;
    }

    public void setSolution(String solution) {
        this.solution = solution;
    }

    public String getGlobalValidation() {
        return globalValidation;
    }

    public void setGlobalValidation(String globalValidation) {
        this.globalValidation = globalValidation;
    }

    public int getSlasId() {
        return slasId;
    }

    public void setSlasId(int slasId) {
        this.slasId = slasId;
    }

    public int getSlalevelsId() {
        return slalevelsId;
    }

    public void setSlalevelsId(int slalevelsId) {
        this.slalevelsId = slalevelsId;
    }

    public Date getDueDate() {
        return dueDate;
    }

    public void setDueDate(Date dueDate) {
        this.dueDate = dueDate;
    }

    public Date getBeginWaitingDate() {
        return beginWaitingDate;
    }

    public void setBeginWaitingDate(Date beginWaitingDate) {
        this.beginWaitingDate = beginWaitingDate;
    }

    public int getSlaWaitingDuration() {
        return slaWaitingDuration;
    }

    public void setSlaWaitingDuration(int slaWaitingDuration) {
        this.slaWaitingDuration = slaWaitingDuration;
    }

    public int getWaitingDuration() {
        return waitingDuration;
    }

    public void setWaitingDuration(int waitingDuration) {
        this.waitingDuration = waitingDuration;
    }

    public int getCloseDelayStat() {
        return closeDelayStat;
    }

    public void setCloseDelayStat(int closeDelayStat) {
        this.closeDelayStat = closeDelayStat;
    }

    public int getSolveDelayStat() {
        return solveDelayStat;
    }

    public void setSolveDelayStat(int solveDelayStat) {
        this.solveDelayStat = solveDelayStat;
    }

    public int getTakeintoaccountDelayStat() {
        return takeintoaccountDelayStat;
    }

    public void setTakeintoaccountDelayStat(int takeintoaccountDelayStat) {
        this.takeintoaccountDelayStat = takeintoaccountDelayStat;
    }

    public int getActiontime() {
        return actiontime;
    }

    public void setActiontime(int actiontime) {
        this.actiontime = actiontime;
    }

    public boolean getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    public int getLocationsId() {
        return locationsId;
    }

    public void setLocationsId(int locationsId) {
        this.locationsId = locationsId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof GlpiTickets)) {
            return false;
        }
        GlpiTickets other = (GlpiTickets) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.comfacauca.xmlc2.entidades.glpi.GlpiTickets[ id=" + id + " ]";
    }
    
}
